package cn.mxb.logic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.mxb.floor.pagination.Result;
import cn.mxb.logic.dao.SysVillageDAO;
import cn.mxb.logic.entity.SysVillage;
import cn.mxb.logic.service.ISysVillageService;

@Service("sysVillageService")
public class SysVillageServiceImpl  implements ISysVillageService {

	@Autowired
	private SysVillageDAO sysVillageDAO;
	
	
	@Override
	public SysVillage findByProperty(String property, String value) {
		return sysVillageDAO.findByProperty(property, value);
	}

	/**
	 * 分页
	 */
	@Override
	public Result<SysVillage> find(SysVillage sysVillage, int page, int row) {
		return sysVillageDAO.find(sysVillage, page, row);
	}

	/**
	 * add
	 */
	@Override
	public SysVillage add(SysVillage SysVillage) {
		return sysVillageDAO.save(SysVillage);
	}

	@Override
	public void delete(int id) {
		sysVillageDAO.remove(SysVillage.class,id);
	}
	@Override
	public void update(SysVillage SysVillage) {
		
	}
	
	@Override
	public List<SysVillage> findListByProperty(String property, String value) {
		return sysVillageDAO.findListByProperty(property, value);
	}

	/**
	 * 查询全部
	 */
	@Override
	public List<SysVillage> findAllList() {
		return sysVillageDAO.getAll(SysVillage.class);
	}


	
}
